import { EnumInterviewPlatform, EnumInterviewType } from "@/api/siderBar/model"

export interface FormState {
    interviewType: EnumInterviewType
    jobType?: [rid: number, pid: number, lid: number]
    interviewPlatform?: EnumInterviewPlatform
    interviewAddress?: number
    note?: string
    interviewDate?: Dayjs
    interviewTime?: Dayjs
    interviewer?: number
}

export interface Populate {
    interviewType?: EnumInterviewType
    jobTypeId?: number
    interviewPlatform?: EnumInterviewPlatform
    interviewAddress?: number
    note?: string
    interviewDateTime?: string
    interviewer?: number
}
export interface Exposed {
    open(detail: MaybeRefOrGetter<Populate>): void
}

export interface Props {
    session?: number
}

export const mapInterviewType = new Map<EnumInterviewType, string>([
    [EnumInterviewType.线下面试, "线下面试"],
    [EnumInterviewType.线上面试, "线上面试"],
])

export const interviewTypeOptions = mapToOptions(mapInterviewType)

export const mapInterviewPlatform = new Map<EnumInterviewPlatform, string>([
    [EnumInterviewPlatform.电话面试, "电话面试"],
    [EnumInterviewPlatform.微信面试, "微信面试"],
    [EnumInterviewPlatform.其他方式, "其他方式（腾讯会议、钉钉、飞书）"],
])

export const interviewPlatformOptions = mapToOptions(mapInterviewPlatform)